package com.ddwl.schema.bo.goods.bargain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * @author: hemiaojun
 * @Date: 2020/10/23
 * @Description:
 */
@Getter
@Setter
@ApiModel("砍价活动修改Bo")
public class BargainActivityUpdateBo {

    @NotNull(message = "id不能为空")
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty(value="是否开启商家配送：0否，1是")
    private Integer localDeliveryTag;

    @ApiModelProperty("是否开启物流配送：0否，1是")
    private Integer logisticsTag;

    @ApiModelProperty("是否开启自提：0否，1是")
    private Integer selfMentionTag;

    @NotNull(message = "活动名称不能为空")
    @ApiModelProperty("活动名称")
    private String name;

    @NotNull(message = "活动开始时间不能为空")
    @ApiModelProperty("活动开始时间")
    private Instant startTime;

    @NotNull(message = "活动结束时间不能为空")
    @ApiModelProperty("活动结束时间")
    private Instant endTime;

    @ApiModelProperty("帮砍金额，0：随机金额，1：固定金额")
    private Integer chopType;

    @ApiModelProperty("随机金额最小值")
    private BigDecimal randomMin;

    @ApiModelProperty("随机金额最大值")
    private BigDecimal randomMax;

    @ApiModelProperty("新用户模式是否开启 0：不开启，1：开启")
    private Integer newUserMode;

    @ApiModelProperty("新人倍率(整数)")
    private Integer newUserRate;

    @ApiModelProperty("帮砍人数")
    private Integer chopNum;

    @NotNull(message = "砍价有效期不能为空")
    @ApiModelProperty("砍价有效期 单位：小时")
    private Integer expireHour;

    @ApiModelProperty("虚拟销售")
    private Integer virtualSale;

    @ApiModelProperty("砍价规则")
    private String rules;

    @ApiModelProperty("商品id")
    private String itemId;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("商品价格")
    private BigDecimal itemPrice;

    @ApiModelProperty("首刀金额")
    private BigDecimal firstMoney;

    @ApiModelProperty("底价")
    private BigDecimal thresholdPrice;

    @ApiModelProperty("超出底价后随机金额最小值")
    private BigDecimal thresholdRandomMin;

    @ApiModelProperty("超出底价后随机金额最大值")
    private BigDecimal thresholdRandomMax;

    @ApiModelProperty("排序")
    private Integer sort;

    @Valid
    @NotNull(message = "商品规格不能为空")
    @ApiModelProperty(value = "砍价商品skuBo",required = true)
    private BargainSkuAddBo bargainSkuAddBo;

}
